package sd.czw.com.mmgapp.activity;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import sd.czw.com.mmgapp.Contants;
import sd.czw.com.mmgapp.R;

/**
 * Created by czw
 * desc 描述：公司简介界面
 */
public class CompanyActiviy extends Activity {

    @Bind(R.id.toolbar_totitle)
    TextView toolbarTotitle;
    @Bind(R.id.toolbar_left_image)
    RelativeLayout toolbarLeftImage;
    @Bind(R.id.webview_company)
    WebView webviewCompany;
    private String urls;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_company);
        ButterKnife.bind(this);
        urls = getIntent().getStringExtra("urls");
        if ("xy".equals(urls)) {
            toolbarTotitle.setText("咩咩购用户协议");
            webviewCompany.loadUrl(Contants.AGREEMENT_URL);
        }else {
            webviewCompany.loadUrl("http://miemiegou.com/wap/themes/miqinew/he.html");
        }
    }

    @OnClick(R.id.toolbar_left_image)
    void onclick(){
        onBackPressed();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ButterKnife.unbind(this);
    }
}
